package src.edu.sctu.lab03;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * Created by Administrator on 2018-5-28.
 */
public class IndexServlet extends HttpServlet {

    @Override // 重写
    protected void doGet(HttpServletRequest request,
                         HttpServletResponse response)
            throws ServletException, IOException {


        // 如何得到out变量？
        PrintWriter out = response.getWriter();
        out.write("<h1>hello, servlet!</h1>");

    }
}
